package entity;

import com.hzheima.util.ImageUtil;

import java.awt.*;
import java.awt.image.BufferedImage;

/**
 * @Author:zhengbowen
 * @Date: 2025/09/07 15:30
 * @Description:子弹类
 */
public class Bullet extends FlyingObject{
    //    子弹伤害
    private int damage;
    public Bullet(int px, int py, int damage) {//px,py子弹出现的位置
        image = ImageUtil.getImg("fire.png");
        width = image.getWidth() / 2;
        height = image.getHeight() / 2;
        x = px - 20;
        y = py;
        this.damage = damage;
    }
    //子弹移动
    public void move(){
        this.y-=ySpeed;
    }

    public int getDamage() {
        return damage;
    }

    public void setDamage(int damage) {
        this.damage = damage;
    }
}
